package com.nl.controller.xuyi.mapper;

import com.nl.controller.xuyi.bean.xuyiline.XuYiLineInfo;
import com.nl.controller.xuyi.bean.xuyiline.LineInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: zhangheng
 * @Desc:
 * @Date: 15:32 2020/9/1
 * @Modified By:
 */
@Mapper
public interface XuYiLineMapper {
    /**
     * desc: 查询点位信息
     * @param regionName:
     * @return: java.util.List<com.nl.controller.xuyi.bean.XuYiLine.LineInfo>
     * @author zhangheng
     * @date 2020/9/1 19:43
     */
    List<LineInfo> qryLineInfo(String regionName);
    
    /**
     * desc: 查询点位信息
     * @param regionName:
     * @return: java.util.List<com.nl.controller.xuyi.bean.XuYiLine.LineInfo>
     * @author zhangheng
     * @date 2020/9/1 19:43
     */
    List<LineInfo> qryLineInfoNew(String regionName);
    /**
     * @desc 新增路线信息
     * @param xuYiLineInfo 
     * @return int
     * @author ll
     * @date 2020/9/26 15:14
     */
    int  addLineInfo(XuYiLineInfo xuYiLineInfo);


    List<XuYiLineInfo> findLineInfo(XuYiLineInfo xuYiLineInfo);

    /**
     * 根据路线名称模糊查询路线名称
     * @param lineName
     * @return
     */
    List<String> findLineNameList(@Param(value="lineName")String lineName);

    /**
     * 获取路线序列
     * @return
     */
    String findLineSeq();

    /**
     * 根据路线id查询路线信息
     * @param lineId
     * @return
     */
    XuYiLineInfo findLineInfoById(@Param(value="lineId")String lineId);

    /**
     * 根据路线id查询关联的点位名称
     * @param lineId
     * @return
     */
    List<String> findPointNamesByLineId(@Param(value="lineId")String lineId);

    /**
     * 新增路线点位关联数据
     * @param lineId
     * @param pointId
     * @param operatorTel
     * @return
     */
    int addLinePointRel(@Param(value="lineId")String lineId,@Param(value="pointId")String pointId,@Param(value="operatorTel")String operatorTel);

    int clearHisRel(String lineId);
}
